import { connectRouter } from 'connected-react-router'
import { combineReducers } from 'redux'
import { History } from 'history'
import authReducer from './auth.reducer'
import categoryReducer from './category.reducer'
import ProductReducer from './product.reducer'

const createRootReducer = (history: History)=> combineReducers({
  router: connectRouter(history),
  auth: authReducer,
  category: categoryReducer,
  product: ProductReducer
})

export default createRootReducer